package net.cnki.sunny.model.dto;

import lombok.Data;
import net.cnki.sunny.common.QueryDTO;
import net.cnki.sunny.model.entity.User;
import net.cnki.sunny.validate.BeanValidation;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class RoleDTO extends QueryDTO {

    @NotNull(message = "id不能为空", groups = BeanValidation.SecondGroup.class)
    private Integer id;

    @NotBlank(message = "角色名称不能为空", groups = BeanValidation.FirstGroup.class)
    @Length(max = 50, message = "名称不能超过50个字符")
    private String roleName;

    @Length(max = 50, message = "用户id不能超过50个字符")
    private String userId;

    private List<Integer> userIds;
}
